<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const target = { a: 1, b: 2 }
      const source = {
        b: 4,
        c: 5,
        e: function () {
          console.log(this.a)
        },
      }

      const returnTarget = Object.assign(target, source)
      console.log(target)
      target.e()
    </script>
  </body>
</html>
